home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime vr / vrscript / feature files / vr3dobjects.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  5.9 KB  |  125 lines

  1. //////////
  2. //
  3. //    File:        VR3DObjects.h
  4. //
  5. //    Contains:    QuickDraw 3D support for QuickTime VR movies.
  6. //
  7. //    Written by:    Tim Monroe
  8. //
  9. //    Copyright:    © 1996 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //    Change History (most recent first):
  12. //
  13. //       <1>         12/05/96    rtm        first file
  14. //       
  15. //////////
  16.  
  17. #pragma once
  18.  
  19.  
  20. //////////
  21. //       
  22. // header files
  23. //       
  24. //////////
  25.  
  26. #include <QD3D.h>
  27. #include <QD3DAcceleration.h>
  28. #include <QD3DGroup.h>
  29. #include <QD3DStorage.h>
  30. #include <QD3DErrors.h>
  31. #include <QD3DView.h>
  32. #include <QD3DMath.h>
  33. #include <QD3DGeometry.h>
  34. #include <QD3DShader.h>
  35. #include <QD3DRenderer.h>
  36. #include <QD3DLight.h>
  37. #include <QD3DDrawContext.h>
  38. #include <QD3DCamera.h>
  39. #include <QD3DTransform.h>
  40. #include <QD3DStorage.h>
  41. #include <QD3DIO.h>
  42. #include <QD3DSet.h>
  43. #include <QDOffscreen.h>
  44.  
  45. #include "ComApplication.h"
  46.  
  47. #if TARGET_OS_MAC
  48. #include "MacFramework.h"
  49. #endif
  50.  
  51. #if TARGET_OS_WIN32
  52. #include "WinFramework.h"
  53. #endif
  54.  
  55. #include "VRScript.h"
  56.  
  57.  
  58. //////////
  59. //       
  60. // constants
  61. //       
  62. //////////
  63.  
  64. #define    kDefaultInterpolation    kQ3InterpolationStyleVertex        // default interpolation style
  65. #define    kDefaultBackfacing        kQ3BackfacingStyleBoth            // default backfacing style
  66. #define    kDefaultFill            kQ3FillStyleFilled                // default fill style
  67. #define    kDefaultRotateRadians    0.1                                // default rotation factor
  68. #define    kDefaultScale            1.0                                // default scale factor
  69. #define    kDefaultChromaKeyState    true                            // default chroma key state for QD3D textures
  70.  
  71. #define    k3DObjectDistance        6.0                                // this controls the point-of-interest
  72. #define    kPicFileHeaderSize        512                                // the number of bytes in PICT file header
  73.  
  74.  
  75. //////////
  76. //       
  77. // function prototypes
  78. //       
  79. //////////
  80.  
  81. void                        VR3DObjects_Init (void);
  82. void                        VR3DObjects_Stop (void);
  83. Boolean                        VR3DObjects_IsQD3DAvailable (void);
  84. void                        VR3DObjects_InitWindowData (WindowObject theWindowObject);
  85. void                        VR3DObjects_DumpWindowData (WindowObject theWindowObject);
  86. Boolean                        VR3DObjects_DoIdle (WindowObject theWindowObject);
  87. void                        VR3DObjects_EnlistBox (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, float theXSize, float theYSize, float theZSize, UInt32 theOptions);
  88. void                        VR3DObjects_EnlistCone (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, float theMajRad, float theMinRad, float theHeight, UInt32 theOptions);
  89. void                        VR3DObjects_EnlistCylinder (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, float theMajRad, float theMinRad, float theHeight, UInt32 theOptions);
  90. void                        VR3DObjects_EnlistEllipsoid (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, float theMajRad, float theMinRad, float theHeight, UInt32 theOptions);
  91. void                        VR3DObjects_EnlistTorus (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, float theMajRad, float theMinRad, float theHeight, float theRatio, UInt32 theOptions);
  92. void                        VR3DObjects_EnlistRectangle (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ,
  93.                                                             float theX1, float theY1, float theZ1, 
  94.                                                             float theX2, float theY2, float theZ2, 
  95.                                                             float theX3, float theY3, float theZ3, 
  96.                                                             float theX4, float theY4, float theZ4, UInt32 theOptions);
  97. void                        VR3DObjects_Enlist3DMFFile (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, UInt32 theOptions, char *thePathName);
  98. TQ3GroupObject                VR3DObjects_CreateDefaultGroup (TQ3GeometryObject theObject);
  99. TQ3ViewObject                VR3DObjects_CreateView (GWorldPtr theGWorld);
  100. TQ3GroupObject                VR3DObjects_CreateLights (void);
  101. TQ3DrawContextObject        VR3DObjects_CreateDrawContext (GWorldPtr theGWorld);
  102. TQ3CameraObject                VR3DObjects_CreateCamera (CGrafPtr thePort);
  103. TQ3AttributeSet                VR3DObjects_GetModelAttributeSet (VRScript3DObjPtr thePointer);
  104. void                        VR3DObjects_SetSubdivisionStyle (TQ3GroupObject theGroup, short theNumDivisions);
  105. void                        VR3DObjects_SetColor (WindowObject theWindowObject, UInt32 theEntryID, float theRed, float theGreen, float theBlue, UInt32 theOptions);
  106. void                        VR3DObjects_SetTransparency (WindowObject theWindowObject, UInt32 theEntryID, float theRed, float theGreen, float theBlue, UInt32 theOptions);
  107. void                        VR3DObjects_SetInterpolation (WindowObject theWindowObject, UInt32 theEntryID, UInt32 theStyle, UInt32 theOptions);
  108. void                        VR3DObjects_SetBackfacing (WindowObject theWindowObject, UInt32 theEntryID, UInt32 theStyle, UInt32 theOptions);
  109. void                        VR3DObjects_SetFill (WindowObject theWindowObject, UInt32 theEntryID, UInt32 theStyle, UInt32 theOptions);
  110. void                        VR3DObjects_SetLocation (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, UInt32 theOptions);
  111. void                        VR3DObjects_SetRotation (WindowObject theWindowObject, UInt32 theEntryID, float theX, float theY, float theZ, UInt32 theOptions);
  112. void                        VR3DObjects_SetRotationState (WindowObject theWindowObject, UInt32 theEntryID, Boolean theState, UInt32 theOptions);
  113. void                        VR3DObjects_SetVisibleState (WindowObject theWindowObject, UInt32 theEntryID, Boolean theState, UInt32 theOptions);
  114. void                        VR3DObjects_SetTexture (WindowObject theWindowObject, UInt32 theEntryID, Boolean isMovie, UInt32 theOptions, char *thePathName);
  115. void                        VR3DObjects_AnimateModel (VRScript3DObjPtr thePointer);
  116. TQ3Status                    VR3DObjects_DrawModel (WindowObject theWindowObject);
  117. TQ3Status                    VR3DObjects_SubmitModel (VRScript3DObjPtr thePointer, TQ3ViewObject theView);
  118. TQ3GroupObject                VR3DObjects_GetModelFromFile (char *thePathName);
  119. void                        VR3DObjects_PrescreenRoutine (QTVRInstance theInstance, WindowObject theWindowObject);
  120. void                        VR3DObjects_SetCamera (WindowObject theWindowObject);
  121. void                        VR3DObjects_SetCameraAspectRatio (WindowObject theWindowObject);
  122. void                        VR3DObjects_UpdateDrawContext (WindowObject theWindowObject);
  123. void                        VR3DObjects_DumpEntryMem (VRScript3DObjPtr theEntry);
  124.  
  125.